function clusID = match_edge(feat, filters, wgh, bias, way )    
    if nargin <5,  way = 1; end
    
    if way ==1
        temp    =  bsxfun(@times,filters,feat); 
        resp    =  sum(sum(temp,1),2);
        siz     =  size(resp);
        resp    =  resp(:).*wgh;
        resp    =  reshape(resp, siz(3:4));
        [maxR,clusID]    =  max(sum(resp,1));
        %resp    =  resp(:);
    elseif way ==2        
        temp    =  bsxfun(@times,filters,feat); 
        resp    =  sum(sum(temp,1),2);
        
        siz     =  size(resp);
        resp    =  resp(:).*wgh;
        resp    =  reshape(resp, siz(3:4));
        
        [maxR,clusID]    =  max( (sum(resp,1) + bias') );        
    end
